<template>
  <header>
    <h2>{{ title }}</h2>
    <span class="iconfont icon-menu" v-if="hasicon"></span>
  </header>
</template>

<script>
export default {
  props: {
    title: String,
    hasicon: Boolean,
  },
  data() {
    return {};
  },
};
</script>

<style lang="less" scoped>
@import "../../assets/css/var.less";

header {
  width: 100%;
  height: 51px;
  background: @theme-color;
  position: relative;
  .center();
  h2 {
    font-size: @l-font;
    color: #fff;
    font-weight: 100;
  }
  .icon-menu {
    position: absolute;
    color: #fff;
    font-size: @s-font;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
}
</style>
